<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta content="telephone=no" name="format-detection" />
    <!-- 留作将来统一添加 -->
    <TEMPLATE>${TEMPLATE}</TEMPLATE>
    <title>模板html</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/index.css">
    <link rel="stylesheet" type="text/css" href="../../css/data-flex.min.css">
    <style type="text/css">
        .score-list {
            position: relative;
            margin: 15px;
            padding: 0 15px;
            box-shadow: 0px 2px 24px 0px rgba(33, 36, 40, 0.06);
            border-radius: 10px;
            overflow: visible;
        }

        .score-list .item {
            height: 55px;
            border-bottom: 1px solid #EFEFEF;
        }

        .score-list .item:last-child {
            border-bottom: 0;
        }

        .score-list .text-black {
            font-size: 14px;
            font-weight: 400;
            color: #222224;
            line-height: 20px;
        }

        .score-list .text-orange {
            font-size: 16px;
            font-weight: 500;
            color: #FD9B43;
        }

        .score-list .text-gray {
            font-size: 12px;
            font-weight: 400;
            color: #BFBFBF;
            padding-right: 5px;
            text-align: right;
        }

        .score-list .icon-arrow {
            width: 15px;
            min-width: 15px;
            height: 15px;
        }
    </style>
</head>
<body>
    <div class="vueApp" v-cloak>
        <div class="score-list">
            <div class="item" v-for="item in listData" @click="handleItem(item)" data-flex="cross:center">
                <div class="text-black">
                    {{item.pbookName}}
                </div>
                <div class="text-orange" style="text-align: right;padding-right: 10px;" data-flex-box="1">{{item.scoreValue||0}}分</div>
                <img src="../../image/ui/ar_gray.png" alt="" class="icon-arrow">
            </div>
        </div>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/service/service-tool.js"></script>
<script type="text/javascript" src="../../script/service/service-app.js"></script>
<script type="text/javascript" src="../../script/service/service-user.js"></script>
<script type="text/javascript" src="../../script/service/service-logic.js"></script>
<script type="text/javascript" src="../../script/jquery.min.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript">
    // html 的引号一律为双引号(""),js 为单引号('')
    var USER, $S, vm, pageParam;
    apiready = function() {
        $S = SERVICE();
        USER = USER();
        console.log(JSON.stringify(api.pageParam) + '=====pageParam');
        pageParam = api.pageParam;
        fnInit();
    };
    // 初始化
    function fnInit() {
        vm = new Vue({
            el: '.vueApp',
            data: {
                listData: []
            }
        });
        getData();
    }


    function getData() {
        var params = {
            id: pageParam.id,
            questionTypeCode: pageParam.code
        };
        var url = 'stuPicture/findPictureBookPageStudentRecordsBycode';
        var callback = function(data) {
            vm.listData = data.listData;
        };
        POST(url, params, callback);
    }

    function handleItem(item) {
        fnOpenPublicWin('错题集', 'video/error_list', {
            itemId: item.id,
            typeCode: pageParam.code
        });
    }
</script>
</html>
